#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void func(int arr[],int* y,int* z)
{
	if (*y == 0)
		return;
	arr[*z] = *y%10;
	*y /= 10;
	*z += 1;
	func(arr, y, z);
}
int main()
{
	int num = 0; int k = 0;
	int arr1[100] = { 0 };
	scanf("%d", &num);
	func(arr1,&num,&k);
	k -= 1;
	while (1)
	{
		printf("%d ", arr1[k]);
		k--;
		if (k == -1)
			break;
	}
	return 0;
}